home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / swtools / mipsABI / examples / sup / PORT / step06 / scan.c.diff < prev    next >
Encoding:
Text File  |  1994-08-02  |  1.0 KB  |  47 lines

  1. *** ../dist/scan.c    Thu Dec 16 07:29:34 1993
  2. --- scan.c    Fri Dec 17 12:10:18 1993
  3. ***************
  4. *** 92,97 ****
  5. --- 92,100 ----
  6.   #include <sys/stat.h>
  7.   #include <sys/dir.h>
  8.   #include <sys/file.h>
  9. + #ifdef _ABI_SOURCE
  10. + #include <utime.h>
  11. + #endif
  12.   #include "sup.h"
  13.   
  14.   /*************************
  15. ***************
  16. *** 891,897 ****
  17. --- 894,904 ----
  18.   char *scanfile;
  19.   {
  20.       char tname[STRINGLENGTH],fname[STRINGLENGTH];
  21. + #ifdef _ABI_SOURCE
  22. +     struct utimbuf tbuf;
  23. + #else
  24.       struct timeval tbuf[2];
  25. + #endif
  26.       FILE *scanF;            /* output file for scanned file list */
  27.       int recordone ();
  28.   
  29. ***************
  30. *** 908,916 ****
  31. --- 915,929 ----
  32.       if (rename (tname,fname) < 0)
  33.           goaway ("Can't change %s to %s",tname,fname);
  34.       (void) unlink (tname);
  35. + #ifdef _ABI_SOURCE
  36. +     tbuf.actime = time((time_t *)NULL);
  37. +     tbuf.modtime = scantime;
  38. +     (void) utime (fname,&tbuf);
  39. + #else
  40.       tbuf[0].tv_sec = time((long *)NULL);  tbuf[0].tv_usec = 0;
  41.       tbuf[1].tv_sec = scantime;  tbuf[1].tv_usec = 0;
  42.       (void) utimes (fname,tbuf);
  43. + #endif
  44.   }
  45.   
  46.   static
  47.